<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
    <title th:text="|亿人宝 - 首页|">p2p网贷平台</title>
    <meta content="" name="keywords"/>
    <meta content="" name="description"/>
    <link rel="stylesheet" th:href="@{/css/common.css}"/>
    <link rel="stylesheet" th:href="@{/css/index.css}" type="text/css">
    <script th:src="@{/script/jquery.min.js}" type="text/javascript"></script>
    <script th:src="@{/script/common.js}" type="text/javascript"></script>
    <script th:src="@{/script/vue.min.js}" type="text/javascript"></script>
    <script th:src="@{/script/axios.min.js}" type="text/javascript"></script>
    <script th:src="@{/layui/layer/layer.js}" type="text/javascript"></script>
    <script type="text/javascript">
        // 上下滚动
        function AutoScroll(obj) {
            $(obj).find("ul:first").animate({
                    marginTop: "-25px"
                },
                500,
                function () {
                    $(this).css({
                        marginTop: "0px"
                    }).find("li:first").appendTo(this);
                });
        }

        $(document).ready(function () {
            var myar = setInterval('AutoScroll("#scrollDiv")', 3000);
            $("#scrollDiv").hover(function () {
                    clearInterval(myar);
                },
                function () {
                    myar = setInterval('AutoScroll("#scrollDiv")', 3000)
                }); //当鼠标放上去的时候，滚动停止，鼠标离开的时候滚动开始
        });
    </script>
    <style>
        /*上下滚动*/
        #scrollDiv {
            width: 400px;
            height: 30px;
            line-height: 30px;
            overflow: hidden;
        }

        #scrollDiv li {
            height: 30px;
            padding-left: 10px;
        }

        .text-tag {
            padding: 0 12px;
            color: #ff7136;
            height: 20px;
            line-height: 20px;
            border: 1px solid #ff7136;
            display: inline-block;
            border-radius: 10px;
            font-size: 12px;
            vertical-align: inherit;
            font-style: normal;
            margin-right: 5px;
            cursor: default;
        }

        .list-loading {
            display: none;
            height: 50px !important;
            line-height: 50px;
            color: #4d4d4d;
            z-index: 999;
            border: 1px solid #fed4c1;
            top: -51px;
            box-sizing: border-box;
        }

        .loading-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 878px;
            height: 100%;
            min-height: 50px;
        }

        .borrow-list {
            position: relative
        }
    </style>
</head>
<body>
<div id="app">
    <div th:replace="common/public::head"></div>
    <!--banner-->
    <div class="flexslider">
        <ul class="slides">
            <li class=""
                style="background-image: url(images/banner.jpg); width: 100%; float: left; margin-right: -100%; position: relative; opacity: 0; display: block; z-index: 1; background-position: 50% 0px; background-repeat: no-repeat no-repeat;"
                th:each="adver : ${advertisements}"
                th:styleappend="|background-image:url(@{${adver.imgUrl}}|">
                <a target="_blank" th:href="${adver.targetUrl}"></a>
            </li>
        </ul>
    </div>
    <script th:src="@{/script/jquery.flexslider-min.js}"></script>
    <script>
        $(function () {
            $('.flexslider').flexslider({
                directionNav: true,
                pauseOnAction: false
            });
            //产品列表滚动
            var pLength = $('.pListContentBox > li').length;
            var cishu = pLength - 4;
            var n = 0;
            $('.pListContentBox').css({'width': pLength * 245 + 'px'});
            if (pLength > 4) {
                $('.pListRight').addClass('curr');
            }
            $('.pListRight').on('click', function () {
                if (cishu > 0) {
                    //alert('1');
                    n++;
                    cishu--;
                    $('.pListContentBox').animate({'left': '-' + n * 244 + 'px'}, 500);
                    if (cishu == 0) {
                        $('.pListRight').removeClass('curr');
                    }
                    if (n > 0) {
                        $('.pListLeft').addClass('curr');
                    }
                }
            });
            $('.pListLeft').on('click', function () {
                if (n > 0) {
                    n--;
                    cishu++;
                    $('.pListContentBox').animate({'left': '-' + n * 244 + 'px'}, 500);
                    if (n == 0) {
                        $('.pListLeft').removeClass('curr');
                    }
                    if (cishu > 0) {
                        $('.pListRight').addClass('curr');
                    }
                }
            });
            //alert(pLength);
        });
    </script>
    <!--注册登陆模块-->

    <div class="login_float" th:if="${session.user == null}">
        <div class="index_login">
            <div class="login_name">亿人宝年化收益率</div>
            <div class="login_num">10<font>%</font>~20<font>%</font></div>
            <!--<div class="login_info">
                <span class="login_info1">
                    <font>3~4倍</font>定期存款收益</span>
                <span class="login_info2">
                    <font>30倍</font>活期存款收益
                </span>
            </div>-->
            <div class="clear"></div>
            <div class="login_btn"><a th:href="@{/register}">立即注册</a></div>
            <p class="login_reg">已有账号，<a th:href="@{/login}">立即登录</a></p>
        </div>
    </div>
    <script type="text/javascript">
        var gaintop;
        $(function () {
            gaintop = $(".login_float").css("top");
            $(".login_float").css("top", -695);
            $(".login_float").show();
            $(".login_float").animate({top: gaintop, opacity: 1}, 800);
            $(".login_float").animate({top: '-=12px', opacity: 1}, 200);
            $(".login_float").animate({top: gaintop, opacity: 1}, 200);
            $(".login_float").animate({top: '-=6px', opacity: 1}, 200);
            $(".login_float").animate({top: gaintop, opacity: 1}, 200);
            $(".login_float").animate({top: '-=2px', opacity: 1}, 100);
            $(".login_float").animate({top: gaintop, opacity: 1}, 100);
        });

    </script>
    <div class="new-announcement">
        <div class="new-announcement-title">最新公告</div>
        <div class="new-announcement-content">
            <div id="scrollDiv">
                <ul style="margin-top: 0px;">
                    <li v-for="notice in noticeList"><a :href="'base/notice-detail/'+notice.id | urlFilter"
                                                        class="black-link"
                                                        target="_blank" v-text="notice.title"></a></li>
                </ul>
            </div>
        </div>
        <a class="more" target="_blank" th:href="@{/base/notice-list}">更多</a></div>
    <div class="ipubs">
        <span class="o1">累计投资金额:<strong v-text="countInvestMoney"></strong>元</span>
        <span class="o2">累计收益金额:<strong v-text="sumProfit"></strong>元</span>
        <span class="o2">投资总次数:<strong v-text="sumInvest"></strong>次</span><span class="o4">注册人数:<strong v-text="countUser"></strong>人</span>
    </div>
    <div class="feature">
        <a class="fea1" href="javascript:"> <i></i>
            <h3>高收益</h3>
            <span>年化收益率最高达“20%<br>
      50元起投，助您轻松获收益</span>
        </a>
        <a class="fea2" href="javascript:"> <i></i>
            <h3>安全理财</h3>
            <span>100%本息保障<br>
      实物质押，多重风控审核</span>
        </a>
        <a class="fea3" href="javascript:"> <i></i>
            <h3>快速到账</h3>
            <span>投资首页、充值金额<br>
      最快当日到账</span>
        </a>
        <a class="fea4" href="javascript:"> <i></i>
            <h3>快速投资</h3>
            <span>操作简单、便捷<br>
        只需几步即可完成投资
      </span>
        </a>
    </div>
    <!--中间内容-->
    <div class="main clearfix mrt30" data-target="sideMenu">
        <div class="wrap">
            <div class="page-left fn-left">
                <!--新手标 start-->
                <div class="mod-borrow" v-if="countInvest == null || countInvest < 3">
                    <!--<div class="hd">
                        <h2 class="pngbg"><i class="icon icon-ttyx"></i>新手推荐</h2>
                        <div class="fn-right f14 c-888">常规发标时间每天<span class="c-555">10:00，13:00和20:00</span>，其余时间根据需要随机发
                        </div>
                    </div>-->
                    <div class="title" style="padding: 13px 20px 10px;border-bottom: 1px solid #e1e1e1;">
                    <span class="name" style="color: #333;
                                                                        font-size: 24px;
                                                                         padding-left: 49px;"
                          th:styleappend="|background: url(@{/images/new-pro.png}) left center no-repeat|"
                          title="新手专享标">新手专享标</span>
                        <span class="tag" style="color: #999;font-size: 16px;margin-left: 5px;">仅限累积投标少于3次用户</span>
                    </div>
                    <div class="bd">
                        <div class="des"><span class="fn-left">新手专享标 利率高 收益快</span>
                            <!--<a class="fn-right">查看更多&gt;&gt;</a>-->
                        </div>
                        <div class="borrow-list">
                            <!--加载条-->
                            <div class="loading-container list-loading" id="load_type1"
                                 th:styleappend="|background: url(@{/images/loading2.gif}) 406px center no-repeat #fdf6f3;|">
                            </div>
                            <div class="g-tc data-empty" style="text-align: center;height: 260px;"
                                 th:styleappend="|background: url(@{/images/empty-f13aeecb6a.png}) center center no-repeat;|"
                                 v-if="productList_type1.length == 0">
                                <p style="padding-top: 200px;text-align: center;">暂无记录</p>
                            </div>
                            <ul>
                                <li v-for="pro_type1 in productList_type1.slice(0,2)">
                                    <div class="title">
                                        <!--                                    <a href="infor.html" target="_blank"><i class="icon icon-zhai" title="债权贷"></i></a>-->
                                        <a
                                                :href="'base/product-detail/'+pro_type1.pid | urlFilter"
                                                :title="pro_type1.pname"
                                                class="f18"
                                                target="_blank" v-text="pro_type1.pname"></a>
                                    </div>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tbody>
                                        <tr>
                                            <td width="260">项目总金额<span class="f24 c-333" v-text="pro_type1.total"></span>元
                                            </td>
                                            <td width="165">年利率<span class="f24 c-333">{{(pro_type1.rate-0.05) * 100 | formatDouble}}% </span>
                                                <span class="orange" style="color: #ef7a46;">+<big>5.00</big>%</span>
                                                <span class="text-tag">新手奖励</span>
                                            </td>
                                            <td align="center" width="180">锁定期限<span class="f24 c-orange" v-text="pro_type1.lockDateMonth"></span>月
                                            </td>
                                            <td>
                                                <div class="circle">
                                                    <div class="left progress-bar">
                                                        <!--进度图片-->
                                                        <div :style="{'background-position': -10 - 60 * (Math.round((pro_type1.haveMoney/pro_type1.total)*10)) + 'px -40px'}"
                                                             class="progress-bgPic progress-bfb5">
                                                            <div class="show-bar"> {{pro_type1.haveMoney/pro_type1.total*100 | formatDouble}}%</div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                            <td align="right">
                                                <a :href="'base/product-detail/'+pro_type1.pid | urlFilter" class="ui-btn btn-gray"
                                                   v-if="(pro_type1.haveMoney/pro_type1.total) < 1">购买</a>
                                                <a :href="'base/product-detail/'+pro_type1.pid | urlFilter" class="ui-btn btn-gray"
                                                   style="background: #dededd!important;cursor: not-allowed;color: #fff;"
                                                   v-if="(pro_type1.haveMoney/pro_type1.total) >= 1">已售罄</a>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <!--新手标 end-->

                <!--推荐项目 start-->
                <div class="mod-borrow mrt20">
                    <div class="hd">
                        <h2 class="pngbg"><i class="icon icon-ttyx"></i>推荐项目</h2>
                        <div class="fn-right f14 c-888">常规发标时间每天<span class="c-555">10:00，13:00和20:00</span>，其余时间根据需要随机发
                        </div>
                    </div>
                    <div class="bd">
                        <div class="des"><span class="fn-left">平台推荐项目，收益见效快</span>
                            <a :href="'base/product-list' | urlFilter" class="fn-right">查看更多&gt;&gt;</a>
                        </div>
                        <div class="borrow-list">
                            <!--加载条-->
                            <div class="loading-container list-loading" id="load_type2"
                                 th:styleappend="|background: url(@{/images/loading2.gif}) 406px center no-repeat #fdf6f3;|">
                                <!--&lt;!&ndash;<div class="loading-inner">加载失败，请 <a href="javascript:;" class="loading-retry">重试</a>&ndash;&gt;
                                </div>-->
                            </div>
                            <div class="g-tc data-empty" style="text-align: center;height: 260px;"
                                 th:styleappend="|background: url(@{/images/empty-f13aeecb6a.png}) center center no-repeat;|"
                                 v-if="productList_type2.length == 0">
                                <p style="padding-top: 200px;text-align: center;">暂无记录</p>
                            </div>
                            <ul>
                                <li v-for="pro_type2 in productList_type2.slice(0,2)">
                                    <div class="title">
                                        <!--<a href="infor.html" target="_blank"><i class="icon icon-zhai"
                                                                                               title="债权贷"></i></a>-->
                                        <a
                                                :href="'base/product-detail/'+pro_type2.pid | urlFilter"
                                                :title="pro_type2.pname"
                                                class="f18"
                                                target="_blank" v-text="pro_type2.pname"></a>
                                    </div>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tbody>
                                        <tr>
                                            <td width="260">项目总金额<span class="f24 c-333" v-text="pro_type2.total"></span>元
                                            </td>
                                            <td width="165">年利率<span class="f24 c-333">{{(pro_type2.rate) * 100 | formatDouble}}% </span>
                                            <td align="center" width="180">锁定期限<span class="f24 c-orange" v-text="pro_type2.lockDateMonth"></span>月
                                            </td>
                                            <td>
                                                <div class="circle">
                                                    <div class="left progress-bar">
                                                        <!--进度图片-->
                                                        <div :style="{'background-position': -10 - 60 * (Math.round((pro_type2.haveMoney/pro_type2.total)*10)) + 'px -40px'}"
                                                             class="progress-bgPic progress-bfb5">
                                                            <div class="show-bar"> {{pro_type2.haveMoney/pro_type2.total*100 | formatDouble}}%</div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                            <td align="right">
                                                <a :href="'base/product-detail/'+pro_type2.pid | urlFilter" class="ui-btn btn-gray"
                                                   v-if="(pro_type2.haveMoney/pro_type2.total) < 1">购买</a>
                                                <a :href="'base/product-detail/'+pro_type2.pid | urlFilter" class="ui-btn btn-gray"
                                                   style="background: #dededd!important;cursor: not-allowed;color: #fff;"
                                                   v-if="(pro_type2.haveMoney/pro_type2.total) >= 1">已售罄</a>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <!--推荐项目 end-->

                <!--单车变摩托 start-->
                <div class="mod-borrow mrt20">
                    <div class="hd">
                        <h2 class="pngbg"><i class="icon icon-yyyz"></i>单车变摩托</h2>
                        <div class="fn-right f14 c-888">参与人次：<span
                                class="c-555" v-text="joinUsers.official">人次</span>&nbsp;&nbsp;&nbsp;
                            <!--平均满标时间：<span
                                class="c-555">1小时24分11秒</span>-->
                        </div>
                    </div>
                    <div class="bd">
                        <div class="des"><span class="fn-left">单车变摩托，你的选择</span>
                            <a :href="'base/product-list' | urlFilter" class="fn-right">查看更多&gt;&gt;</a>
                        </div>
                        <div class="borrow-list">
                            <!--加载条-->
                            <div class="loading-container list-loading" id="load_type3"
                                 th:styleappend="|background: url(@{/images/loading2.gif}) 406px center no-repeat #fdf6f3;|">
                                <!-- &lt;!&ndash;<div class="loading-inner">加载失败，请 <a href="javascript:;" class="loading-retry">重试</a>&ndash;&gt;
                                 </div>-->
                            </div>
                            <div class="g-tc data-empty" style="text-align: center;height: 260px;"
                                 th:styleappend="|background: url(@{/images/empty-f13aeecb6a.png}) center center no-repeat;|"
                                 v-if="productList_type3.length == 0">
                                <p style="padding-top: 200px;text-align: center;">暂无记录</p>
                            </div>
                            <ul>
                                <li v-for="pro_type3 in productList_type3.slice(0,2)">
                                    <div class="title">
                                        <!--<a href="infor.html" target="_blank"><i class="icon icon-zhai"
                                                                                               title="债权贷"></i></a>-->
                                        <a
                                                :href="'base/product-detail/'+pro_type3.pid | urlFilter"
                                                :title="pro_type3.pname"
                                                class="f18"
                                                target="_blank" v-text="pro_type3.pname"></a>
                                    </div>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tbody>
                                        <tr>
                                            <td width="260">项目总金额<span class="f24 c-333" v-text="pro_type3.total"></span>元
                                            </td>
                                            <td width="165">年利率<span class="f24 c-333">{{(pro_type3.rate) * 100 | formatDouble}}% </span>
                                            <td align="center" width="180">锁定期限<span class="f24 c-orange" v-text="pro_type3.lockDateMonth"></span>月
                                            </td>
                                            <td>
                                                <div class="circle">
                                                    <div class="left progress-bar">
                                                        <!--进度图片-->
                                                        <div :style="{'background-position': -10 - 60 * (Math.round((pro_type3.haveMoney/pro_type3.total)*10)) + 'px -40px'}"
                                                             class="progress-bgPic progress-bfb5">
                                                            <div class="show-bar"> {{pro_type3.haveMoney/pro_type3.total*100 | formatDouble}}%</div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                            <td align="right">
                                                <a :href="'base/product-detail/'+pro_type3.pid | urlFilter" class="ui-btn btn-gray"
                                                   v-if="(pro_type3.haveMoney/pro_type3.total) < 1">购买</a>
                                                <a :href="'base/product-detail/'+pro_type3.pid | urlFilter" class="ui-btn btn-gray"
                                                   style="background: #dededd!important;cursor: not-allowed;color: #fff;"
                                                   v-if="(pro_type3.haveMoney/pro_type3.total) >= 1">已售罄</a>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <!--单车变摩托 end-->

                <!--散标 start-->
                <div class="mod-borrow mrt20">
                    <div class="hd">
                        <h2 class="pngbg"><i class="icon icon-nnyy"></i>散标</h2>
                        <div class="fn-right f14 c-888">参与人次：<span
                                class="c-555" v-text="joinUsers.loan">人次</span>&nbsp;&nbsp;&nbsp;
                            <!--平均满标时间：<span
                                class="c-555">1小时41分19秒</span>-->
                        </div>
                    </div>
                    <div class="bd">
                        <div class="des"><span class="fn-left">一对一，打理更加容易</span>
                            <a :href="'base/product-list' | urlFilter" class="fn-right">查看更多&gt;&gt;</a>
                        </div>
                        <div class="borrow-list">
                            <!--加载条-->
                            <div class="loading-container list-loading" id="load_type4" style="top: 2022px;left: 76px;"
                                 th:styleappend="|background: url(@{/images/loading2.gif}) 406px center no-repeat #fdf6f3;|">
                                <!-- &lt;!&ndash;<div class="loading-inner">加载失败，请 <a href="javascript:;" class="loading-retry">重试</a>&ndash;&gt;
                                 </div>-->
                            </div>
                            <div class="g-tc data-empty" style="text-align: center;height: 260px;"
                                 th:styleappend="|background: url(@{/images/empty-f13aeecb6a.png}) center center no-repeat;|"
                                 v-if="productList_type4.length == 0">
                                <p style="padding-top: 200px;text-align: center;">暂无记录</p>
                            </div>
                            <ul>
                                <li v-for="pro_type4 in productList_type4.slice(0,2)">
                                    <div class="title">
                                        <!--<a href="infor.html" target="_blank"><i class="icon icon-zhai"
                                                                                               title="债权贷"></i></a>-->
                                        <a
                                                :href="'base/product-detail/'+pro_type4.pid | urlFilter"
                                                :title="pro_type4.pname"
                                                class="f18"
                                                target="_blank" v-text="pro_type4.pname"></a>
                                    </div>
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tbody>
                                        <tr>
                                            <td width="260">项目总金额<span class="f24 c-333" v-text="pro_type4.total"></span>元
                                            </td>
                                            <td width="165">年利率<span class="f24 c-333">{{(pro_type4.rate) * 100 | formatDouble}}% </span>
                                            <td align="center" width="180">锁定期限<span class="f24 c-orange" v-text="pro_type4.lockDateMonth"></span>月
                                            </td>
                                            <td>
                                                <div class="circle">
                                                    <div class="left progress-bar">
                                                        <!--进度图片-->
                                                        <div :style="{'background-position': -10 - 60 * (Math.round((pro_type4.haveMoney/pro_type4.total)*10)) + 'px -40px'}"
                                                             class="progress-bgPic progress-bfb5">
                                                            <div class="show-bar"> {{pro_type4.haveMoney/pro_type4.total*100 | formatDouble}}%</div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </td>
                                            <td align="right">
                                                <a :href="'base/product-detail/'+pro_type4.pid | urlFilter" class="ui-btn btn-gray"
                                                   v-if="(pro_type4.haveMoney/pro_type4.total) < 1">购买</a>
                                                <a :href="'base/product-detail/'+pro_type4.pid | urlFilter" class="ui-btn btn-gray"
                                                   style="background: #dededd!important;cursor: not-allowed;color: #fff;"
                                                   v-if="(pro_type4.haveMoney/pro_type4.total) >= 1">已售罄</a>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <!--散标 end-->
            </div>
            <div class="page-right fn-right" style="top: 0px;">
                <div class="mod-risk-tip"><i class="icon icon-tip"></i><a class="c-orange" th:href="@{/}">收益与风险并存，请理性选择平台</a>
                </div>
                <div class="mod mod-notice mrt20">
                    <div class="hd">
                        <h3>网站公告</h3>
                        <a class="fn-right" th:href="@{/base/notice-list}">更多&gt;</a></div>
                    <div class="bd">
                        <div class="article-list clearfix">
                            <ul>
                                <li v-for="notice in noticeList.slice(0,5)">
                                    <a :href="'base/notice-detail/'+notice.id | urlFilter"
                                       :title="notice.title" v-text="notice.title"></a>
                                    <span class="date">{{notice.createDate | formatDate}}</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="mod mod-rank clearfix ui-tab mrt20">
                    <div class="hd">
                        <h3>排行榜</h3>
                        <div class="ui-tab-nav"><i class="icon icon-cur"></i>
                            <ul>
                                <li class="active"><a href="javascript:">收益</a></li>
                                <li><a href="javascript:">投资</a></li>
                            </ul>
                            <a class="fn-right" href="javascript:"></a>
                        </div>
                    </div>
                    <div class="bd">
                        <div class="ui-tab-cont">
                            <div class="ui-tab-item active">
                                <ul class="rank-list">
                                    <li v-for="(user,index) in topFiveInvestAndProfit.profits">
                                        <span class="fl"><em class="n1" style="margin-right: 20px">0{{+index+1}}</em>{{user.name.split('')[0]}}**</span>
                                        <span class="fr" style="margin-left: 83px;" v-text="'￥'+user.sumProfit"></span>
                                    </li>
                                </ul>
                            </div>
                            <div class="ui-tab-item">
                                <ul class="rank-list">
                                    <li v-for="(user,index) in topFiveInvestAndProfit.invests">
                                        <span class="fl"><em class="n1" style="margin-right: 20px">0{{index+1}}</em>{{user.name.split('')[0]}}**</span>
                                        <span class="fr" style="margin-left: 83px;" v-text="'￥'+user.sumMoney"></span>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mod mod-report ui-tab clearfix mrt20">
                    <div class="hd">
                        <div class="ui-tab-nav"><i class="icon icon-cur"></i>
                            <ul>
                                <li class="active"><a href="javascript:">媒体报道</a></li>
                                <li class=""><a href="javascript:">理财知识</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="bd">
                        <div class="ui-tab-cont">
                            <div class="ui-tab-item active">
                                <div class="headlines">
                                    <ul>
                                        <li v-for="notice in noticeList.slice(0,5)" v-if="notice.classify == '媒体报道'">
                                            <!--{{notice.title}}-->
                                            <a :href="'base/notice-detail/'+notice.id | urlFilter"
                                               :title="notice.title" target="_blank" v-text="notice.title"></a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="ui-tab-item">
                                <div class="article-list">
                                    <ul>
                                        <li v-for="notice in noticeList.slice(0,5)" v-if="notice.classify == '理财知识'">
                                            <!-- [<a href="#">P2P网贷</a>]-->
                                            <a :href="'base/notice-detail/'+notice.id | urlFilter"
                                               :title="notice.title" target="_blank" v-text="notice.title"></a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mrt20 mod">
                    <a href="javascript:"><img @click="showCalc" alt="收益计算器" class="pic" height="80"
                                               th:src="@{images/pic_home_js.jpg}" width="300">
                    </a>
                </div>
            </div>
        </div>
    </div>
    <script th:src="@{script/jquery.jcarousellite.min.js}"></script>
    <script th:src="@{script/index.js}"></script>
    <!--<div class="partners wrap clearfix mrb30">
        <div class="partners-inner ui-tab">
            <div class="hd">
                <div class="ui-tab-nav"><i class="icon icon-cur" style="left: 151px;"></i>
                    <ul>
                        <li class=""><a href="#">合作机构</a></li>
                        <li class="active"><a href="#">友情链接</a></li>
                    </ul>
                </div>
            </div>
            <div class="bd">
                <div class="ui-tab-cont">
                    <div class="ui-tab-item active">
                        <div class="img-scroll">
                            <div class="container">
                                <ul>
                                    <li><img alt="软银" height="52" th:src="@{/images/logo_sbcvc.png}" width="152"></li>
                                    <li><img alt="农业银行" height="52" th:src="@{/images/logo_abc.png}" width="152"></li>
                                    <li><img alt="网贷之家" height="52" th:src="@{/images/logo_wdzj.png}" width="152"></li>
                                    <li><img alt="百度" height="52" th:src="@{/images/logo_baidu.png}" width="152"></li>
                                    <li><img alt="安全宝" height="52" th:src="@{/images/logo_aqb.png}" width="152"></li>
                                    <li><img alt="万国数据" height="52" th:src="@{/images/logo_gds.png}" width="152"></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="ui-tab-item">
                        <div class="links">
                            <a href="http://www.wd361.com" target="_blank">网贷互联</a>
                            <a href="http://www.bjzq.com.cn" target="_blank">北京证券网</a>
                            <a href="http://v.yidai.com/" target="_blank">易贷微理财</a>
                            <a href="http://www.wangdaicaifu.com" target="_blank">P2P</a>
                            <a href="http://www.p2pchina.com" target="_blank">网贷中国</a>
                            <a href="http://www.wangdaibangshou.com" target="_blank">网贷帮手</a>
                            <a href="https://www.okcoin.cn" target="_blank">比特币网</a>
                            <a href="http://www.p2p110.com" target="_blank">网贷110</a>
                            <a href="http://www.zcmall.com" target="_blank">招财猫理财</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>-->
    <!--网站底部-->
    <div th:replace="common/public::footer"></div>
</div>

<script type="text/javascript">
    const baseUrl = '[[@{/base/}]]';
    const type_new = 1;//新手标
    const type_recommend = 2;//推荐标
    const type_official = 3;//普通标
    const type_loan = 4;//散标标

    new Vue({
        el: '#app',
        data: {
            advertisementList: [], //轮播图
            noticeList: [], //公告
            productList_type1: [], //新手标
            productList_type2: [], //推荐标
            productList_type3: [], //平台标
            productList_type4: [], //散标
            pager: {
                currPage: 1,
                pageSize: 10,
                totalRow: 0,
                totalPage: 0
            },
            //登陆用户的投资数量
            countInvest: 0,
            //总投资金额
            countInvestMoney: 0,
            //总收益金额
            sumProfit: 0,
            //投资总次数
            sumInvest: 0,
            //用户数
            countUser: 0,
            //前五投资收益
            topFiveInvestAndProfit: {
                invests: [],
                profits: []
            },
            //投资人数
            joinUsers: {
                official: 0,
                loan: 0
            }
        },
        filters: {
            formatDate: function (value) {
                let date = new Date(value);
                let y = date.getFullYear();
                let MM = date.getMonth() + 1;
                MM = MM < 10 ? ('0' + MM) : MM;
                let d = date.getDate();
                d = d < 10 ? ('0' + d) : d;
                let h = date.getHours();
                h = h < 10 ? ('0' + h) : h;
                let m = date.getMinutes();
                m = m < 10 ? ('0' + m) : m;
                let s = date.getSeconds();
                s = s < 10 ? ('0' + s) : s;
                return y + '-' + MM + '-' + d;
            },
            formatDouble: function (value) {
                return (value).toFixed(2);
            },
            urlFilter: function (val) {
                return '[[@{/}]]' + val;
            }
        },
        methods: {
            //加载轮播图
            loadAdvertisementList: function () {
                axios.get(baseUrl + 'findAdvertisement')
                    .then(response => {
                        console.log(response);
                        this.advertisementList = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载公告
            loadNoticeList: function () {
                axios.get(baseUrl + 'findNotice')
                    .then(response => {
                        console.log(response);
                        this.noticeList = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载新手标
            loadProductList_type1: function () {
                $('#load_type1').show();
                axios.get(baseUrl + 'product/product-list', {
                    params: {
                        type: type_new,
                        currPage: this.pager.currPage
                    }
                })
                    .then(response => {
                        $('#load_type1').hide();
                        console.log('新手标' + response);
                        this.productList_type1 = response.data.obj.productList;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载推荐标
            loadProductList_type2: function () {
                $('#load_type2').show();
                axios.get(baseUrl + 'product/product-list', {
                    params: {
                        type: type_recommend,
                        currPage: this.pager.currPage
                    }
                })
                    .then(response => {
                        $('#load_type2').hide();
                        console.log('推荐标' + response);
                        this.productList_type2 = response.data.obj.productList;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载平台标
            loadProductList_type3: function () {
                $('#load_type3').show();
                axios.get(baseUrl + 'product/product-list', {
                    params: {
                        type: type_official,
                        currPage: this.pager.currPage
                    }
                })
                    .then(response => {
                        $('#load_type3').hide();
                        console.log('平台标' + response);
                        this.productList_type3 = response.data.obj.productList;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载散标
            loadProductList_type4: function () {
                $('#load_type4').show();
                axios.get(baseUrl + 'product/product-list', {
                    params: {
                        type: type_loan,
                        currPage: this.pager.currPage
                    }
                })
                    .then(response => {
                        $('#load_type4').hide();
                        console.log('散标' + response);
                        this.productList_type4 = response.data.obj.productList;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载用户投资数量
            loadCountInvest: function () {
                axios.get(baseUrl + 'product/countInvest')
                    .then(response => {
                        this.countInvest = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载投资总金额
            loadCountInvestMoney: function () {
                axios.get(baseUrl + 'countInvestMoney')
                    .then(response => {
                        this.countInvestMoney = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载总收益金额
            loadSumProfit: function () {
                axios.get(baseUrl + 'sumProfit')
                    .then(response => {
                        this.sumProfit = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载用户数量
            loadCountUser: function () {
                axios.get(baseUrl + 'countUser')
                    .then(response => {
                        this.countUser = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载投资次数
            loadSumInvest: function () {
                axios.get(baseUrl + 'sumInvest')
                    .then(response => {
                        this.sumInvest = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载前五收益投资
            loadTopFiveInvestAndProfit: function () {
                axios.get(baseUrl + 'topFiveInvestAndProfit')
                    .then(response => {
                        this.topFiveInvestAndProfit = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //加载参与人次
            loadJoinUsers: function () {
                axios.get(baseUrl + 'product/sumUsersByProType', {
                    params: {
                        official: type_official,
                        loan: type_loan
                    }
                })
                    .then(response => {
                        this.joinUsers = response.data.obj;
                    })
                    .catch(function (error) {
                        console.log(error);
                    })
            },
            //打开计算器
            showCalc: function () {
                layer.open({
                    title: '收益计算器',
                    type: 2,
                    content: baseUrl + 'calc',
                    area: ['430px', '475px']
                });
            }
        },
        mounted() {
            //执行多个并发请求
            axios.all([this.loadNoticeList(), this.loadProductList_type1(), this.loadProductList_type2(), this.loadProductList_type3(), this.loadProductList_type4(), this.loadCountInvest(), this.loadCountInvestMoney(), this.loadSumProfit(), this.loadSumInvest(), this.loadCountUser(), this.loadTopFiveInvestAndProfit(), this.loadJoinUsers()])
                .then(axios.spread(function (acct, perms) {
                    console.log('加载完成');
                }));
        }
    })
</script>
</body>
</html>
